/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.edu.ifrn.controlador;

import br.edu.ifrn.dao.RelatorioDAO;
import br.edu.ifrn.dominio.Relatorio;
import java.sql.SQLException;
import java.util.LinkedList;

/**
 *
 * @author Teixeira
 */
public class ControladorRelatorio {
    
    public static void adicionarRelatorio(Relatorio re) throws SQLException{
 
       RelatorioDAO res = new RelatorioDAO();
       res.insertRelatorio(re);
    }
    
    public static boolean deletarRelatorio(int ID) throws SQLException{
        RelatorioDAO res = new RelatorioDAO();
        res.deleteRelatorio(ID);
        
        return true;
    }
    
    public static LinkedList pesquisarRelatorio(int ID) throws SQLException{
        RelatorioDAO res = new RelatorioDAO();
        LinkedList res2 = res.selectRelatorioById(ID);
        
        return res2;
    }
    
}
